package com.example.administrator.smartbutler.service;

import android.os.Bundle;
import android.util.Log;

import com.example.administrator.smartbutler.entity.CourierCompany;
import com.example.administrator.smartbutler.ui.BaseActivity;
import com.example.administrator.smartbutler.utils.L;

import cn.bmob.v3.exception.BmobException;
import cn.bmob.v3.listener.SaveListener;

/**
 * 项目名:SmartButler
 * 包名:com.example.administrator.smartbutler.service
 * 文件名：InitBombService
 * 创建者：justin
 * Created by Administrator on 2018/2/9.
 * 描述：TODO
 */

public class InitBombService extends BaseActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        init();
    }

    public  void init() {

        CourierCompany cc=new CourierCompany();
        cc.setId(1);
        cc.setName("顺风");
        cc.setCode("sf");
        cc.save(new SaveListener<String>() {
            @Override
            public void done(String s, BmobException e) {
                if(e==null){
                    L.i("保存成功");
                }else{
                    L.e("保存失败");
                }
            }
        });

    }


}
